package com.example.a313ldy.yuejian_17.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.a313ldy.yuejian_17.R;
import com.squareup.picasso.Picasso;

/**
 * Created by LDY on 2017/10/25.
 */

public class Activity_paydetail extends AppCompatActivity {
    private ImageView act_pic;
    private TextView act_name;
    private TextView act_pay;
    private TextView act_num;
    private TextView pay_time;
    private TextView pay_way;
    private ImageButton back;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_paydetail);
        initView();
    }

    private void initView() {
        final Intent intent = getIntent();
        act_pic =(ImageView)findViewById(R.id.act_pic);
        Picasso.with(this).load(intent.getStringExtra("img")).into(act_pic);

        act_name = (TextView) findViewById(R.id.act_name);
        act_name.setText(intent.getStringExtra("act_name"));

        act_pay = (TextView) findViewById(R.id.act_pay);
        act_pay.setText(intent.getStringExtra("act_pay"));

        act_num = (TextView)findViewById(R.id.act_num);
        act_num.setText(intent.getStringExtra("act_num"));

        pay_time = (TextView)findViewById(R.id.pay_time);
        pay_time.setText(intent.getStringExtra("pay_time"));

        pay_way = (TextView)findViewById(R.id.pay_way);
        pay_way.setText(intent.getStringExtra("pay_way"));

        back = (ImageButton)findViewById(R.id.back);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =  new Intent(Activity_paydetail.this,MainActivity.class);
                //startActivity(intent);
                onBackPressed();
            }
        });

    }
}